<template>
	<view class="viewDetailsPage">
		<view class="viewDetailsTop flex-column border-bottom-f7f7f7">
			<view class="flex-column  ">
				<image class="avatar" :src="userInfo.avatar" mode=""></image>
				<view class="padding_20rpx_0">
					手机号: {{userInfo.phone}}
				</view>
				<view style="color: rgb(255, 0, 0);" class="font-weight_bold  ">
					{{currency_name}}：{{withdrawal.number}}
				</view>
			</view>

		</view>
		<view class="padding_40rpx  viewDetails ">

			<view class="flex-between padding-bottom_40rpx">
				<view style="color: rgb(0, 0, 0);">
					提现单号：
				</view>
				<view class="font-overflow" style="color: rgb(80, 77, 78);">
					<text>{{withdrawal.sn_order}}</text>
				</view>
			</view>
			<view class="flex-between padding-bottom_40rpx">
				<view style="color: rgb(0, 0, 0);">
					提现方式：
				</view>
				<view class="font-overflow" style="color: rgb(80, 77, 78);">
					{{withdrawal.pay_mode==1||withdrawal.pay_mode==3?'微信':'支付宝'}}
				</view>
			</view>
			<view class="flex-between padding-bottom_40rpx">
				<view style="color: rgb(0, 0, 0);">
					实际到账金额：
				</view>
				<view class="font-overflow font-weight_bold" style="color: rgb(255, 0, 0);">
					{{withdrawal.amount}}
				</view>
			</view>
			<view class="flex-between padding-bottom_40rpx">
				<view style="color: rgb(0, 0, 0);">
					提现手续费：
				</view>
				<view class="font-overflow font-weight_bold" style="color: rgb(255, 0, 0);">
					{{withdrawal.fees_ratio}}%
				</view>
			</view>
			<view class="flex-between padding-bottom_40rpx">
				<view style="color: rgb(0, 0, 0);">
					RMB/{{currency_name}}兑换比例：
				</view>
				<view class="font-overflow font-weight_bold" style="color: rgb(255, 0, 0);">
					1/{{withdrawal.ratio}}
				</view>
			</view>
			<view class="flex-between padding-bottom_40rpx">
				<view style="color: rgb(0, 0, 0);">
					{{currency_name}}提现手续费：	
				</view>
				<view class="font-overflow font-weight_bold" style="color: rgb(255, 0, 0);">
					<!-- {{(withdrawal.number*(withdrawal.fees_ratio/100)).toFixed(3)}} -->
					{{withdrawal.fees}}
					
				</view>
			</view>
			<view class="flex-between ">
				<view style="color: rgb(0, 0, 0);">
					申请时间：
				</view>
				<view class="font-overflow" style="color: rgb(80, 77, 78);">
					<text>{{withdrawal.create_time}}</text>
				</view>
			</view>


		</view>
		<view class="padding_40rpx  margin-top_20rpx background-color_FFFFFF" v-if="withdrawal.status==4">
			<text class="font-weight_bold " style="min-width: 130rpx;font-size: 28rpx;">备注内容</text>
			<view class="margin-top_20rpx">
				<view class="uni-textarea">
					<textarea v-model="withdrawal.remark" :disabled="withdrawal.status==4||withdrawal.status==3?true:false" placeholder-style="color:#999;"
						placeholder="同意或者拒绝时候要说的文字" />
				</view>
			</view>
		</view>

	

	</view>
</template>

<script>
	export default {
		components: {

		},
		data() {
			return {
				currency_name:uni.getStorageSync('system').currency_name,
				userInfos: uni.getStorageSync("userInfo"),
				tabIndex: 4,
				form: {
					feedbackContent: ''
				},
				withdrawal:null,
				userInfo:null,
				
				form:{
					id:'',
					remark:''
				}
				
			}
		},
		onLoad(options) {
             this.userInfoFn()
			 this.withdrawalInfoFn(options.id)
	
		},
		
		methods: {
			
			
		async withdrawalInfoFn(id){
			const result = await this.$http.post({
				url: this.$api.withdrawalInfo,
				data: {
					
			          id:id
			
			
				},
				headers: {
					'Authorization': this.userInfos.token
				}
			
			})
			
			if (result.code == 0) {
				console.log('data', result.data);
				this.withdrawal=result.data
				
				
			}else{
				this.$sun.toast(result.message, 'none')
			}
		},
		async userInfoFn(){
			const result = await this.$http.post({
				url: this.$api.userInfo,
				data: {
					
			
			
			
				},
				headers: {
					'Authorization': this.userInfos.token
				}
			
			})
			
			if (result.code == 0) {
				console.log('data', result.data);
				this.userInfo=result.data
				
				
			}else{
				this.$sun.toast(result.message, 'none')
			}
		},
			
           
		}
	}
</script>

<style lang="less" scoped>
	.viewDetailsPage {
		.viewDetailsTop {
			width: 750rpx;
			padding: 40rpx 0;
			background: rgb(255, 255, 255);

			.avatar {
				width: 116rpx;
				height: 116rpx;
				border-radius: 50%;
			}
		}

		.viewDetails {
			background: rgb(255, 255, 255);
		}

	}

	.bottomFixed {
		background: rgb(255, 255, 255);
		padding: 18rpx;
		height: 128rpx;
		position: fixed;
		bottom: 0;
		width: 750rpx;

		.reset {
			width: 260rpx;
			height: 88rpx;
			background: rgb(255, 0, 0);
			color: rgb(255, 255, 255);
		}

		.confirm {
			width: 428rpx;
			height: 88rpx;
			background-color: rgb(42, 137, 255);
			color: rgb(255, 255, 255);

			font-size: 32rpx;
			font-weight: 400;
		}
	}

	page {
		background: #f6f6f6;
	}
</style>